package com.jt.service;

import com.jt.dao.UserDao;
import com.jt.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("userServiceA")
public class UserServiceImpl implements UserService {

    @Autowired //默认以类型进行注入
    //@Qualifier("A") 一般不写 按名称匹配
    private UserDao userDao;

    @Override
    public void addUser(User user) {
        System.out.println("A");
        userDao.addUser(user);
    }

}
